home *** CD-ROM | disk | FTP | other *** search
/ ASP Advantage 1993 / The Association of Shareware Professionals Advantage CD-ROM 1993.iso / files / mathtics / mathpl32 / mathplot.doc < prev    next >
Text File  |  1993-06-22  |  62KB  |  1,538 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.                                 M A T H P L O T
  7.  
  8.  
  9.  
  10.                      Mathematical Function Plotting Program
  11.  
  12.                              A "shareware" program
  13.  
  14.  
  15.  
  16.                                Phillip H. Sherrod
  17.  
  18.               Member, Association of Shareware Professionals (ASP)
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.           Mathplot allows you to specify mathematical functions  using
  27.           ordinary  algebraic  expressions  and immediately plot them.
  28.           Four  types  of  functions  may  be   specified:   cartesian
  29.           (Y=f(X));  parametric  cartesian  (Y=f(T) and X=f(T)); polar
  30.           (Radius=f(Angle)); and  parametric  polar  (Radius=f(T)  and
  31.           Angle=f(T)).    Up   to   four   functions  may  be  plotted
  32.           simultaneously.   Scaling   is   automatic.    Options   are
  33.           available  to  control  axis display and labeling as well as
  34.           grid lines.   Hard  copy  output  can  be  generated  to  HP
  35.           LaserJet  printers  as  well as screen display.  Mathplot is
  36.           an ideal tool for engineers, scientists,  math  and  science
  37.           teachers,  and  anyone  else  who needs to quickly visualize
  38.           mathematical functions.
  39.  
  40.  
  41.  
  42.  
  43.  
  44.                                Table of Contents
  45.  
  46.  
  47.  
  48.       1. Using Mathplot . . . . . . . . . . . . . . . . . . . . . . . .  1
  49.         1.1 Introduction  . . . . . . . . . . . . . . . . . . . . . . .  1
  50.         1.2 Installing Mathplot . . . . . . . . . . . . . . . . . . . .  1
  51.         1.3 Getting Started . . . . . . . . . . . . . . . . . . . . . .  2
  52.         1.4 Demonstration Command File  . . . . . . . . . . . . . . . .  4
  53.         1.5 Command Editor  . . . . . . . . . . . . . . . . . . . . . .  4
  54.           1.5.1 Function Keys . . . . . . . . . . . . . . . . . . . . .  4
  55.           1.5.2 Control Characters  . . . . . . . . . . . . . . . . . .  4
  56.         1.6 Function Specification  . . . . . . . . . . . . . . . . . .  4
  57.           1.6.1 Arithmetic Operators  . . . . . . . . . . . . . . . . .  5
  58.           1.6.2 Numeric Constants . . . . . . . . . . . . . . . . . . .  5
  59.           1.6.3 Symbolic Constants  . . . . . . . . . . . . . . . . . .  5
  60.           1.6.4 Parameter values  . . . . . . . . . . . . . . . . . . .  5
  61.         1.7 Built in Functions  . . . . . . . . . . . . . . . . . . . .  6
  62.         1.8 Function Types  . . . . . . . . . . . . . . . . . . . . . .  8
  63.           1.8.1 Cartesian Functions . . . . . . . . . . . . . . . . . .  8
  64.           1.8.2 Parametric Cartesian Functions  . . . . . . . . . . . .  9
  65.           1.8.3 Polar Functions . . . . . . . . . . . . . . . . . . . .  9
  66.           1.8.4 Parametric Polar Functions  . . . . . . . . . . . . . .  9
  67.         1.9 Plotting Simultaneous Functions . . . . . . . . . . . . . . 10
  68.  
  69.       2. Mathplot Commands  . . . . . . . . . . . . . . . . . . . . . . 11
  70.         2.1 Startup Command File  . . . . . . . . . . . . . . . . . . . 11
  71.         2.2 Initialization file . . . . . . . . . . . . . . . . . . . . 11
  72.         2.3 Command Arguments . . . . . . . . . . . . . . . . . . . . . 12
  73.         2.4 Alphabetical List of Commands . . . . . . . . . . . . . . . 12
  74.           2.4.1 AXES  . . . . . . . . . . . . . . . . . . . . . . . . . 12
  75.           2.4.2 CALCULATE . . . . . . . . . . . . . . . . . . . . . . . 12
  76.           2.4.3 CAXES . . . . . . . . . . . . . . . . . . . . . . . . . 12
  77.           2.4.4 CFn . . . . . . . . . . . . . . . . . . . . . . . . . . 12
  78.           2.4.5 CGRID . . . . . . . . . . . . . . . . . . . . . . . . . 13
  79.           2.4.6 COMMONSCALE . . . . . . . . . . . . . . . . . . . . . . 13
  80.           2.4.7 CTITLE  . . . . . . . . . . . . . . . . . . . . . . . . 13
  81.           2.4.8 DATA  . . . . . . . . . . . . . . . . . . . . . . . . . 13
  82.           2.4.9 DISPLAY . . . . . . . . . . . . . . . . . . . . . . . . 13
  83.           2.4.10 DO . . . . . . . . . . . . . . . . . . . . . . . . . . 13
  84.           2.4.11 DOMAIN . . . . . . . . . . . . . . . . . . . . . . . . 13
  85.           2.4.12 EXIT . . . . . . . . . . . . . . . . . . . . . . . . . 14
  86.           2.4.13 GRID . . . . . . . . . . . . . . . . . . . . . . . . . 14
  87.           2.4.14 HELP . . . . . . . . . . . . . . . . . . . . . . . . . 14
  88.           2.4.15 LABEL  . . . . . . . . . . . . . . . . . . . . . . . . 14
  89.           2.4.16 LIST . . . . . . . . . . . . . . . . . . . . . . . . . 14
  90.           2.4.17 NUMPOINTS  . . . . . . . . . . . . . . . . . . . . . . 14
  91.           2.4.18 ORIGIN . . . . . . . . . . . . . . . . . . . . . . . . 14
  92.           2.4.19 Pn . . . . . . . . . . . . . . . . . . . . . . . . . . 14
  93.           2.4.20 PAUSE  . . . . . . . . . . . . . . . . . . . . . . . . 15
  94.           2.4.21 PDEVICE  . . . . . . . . . . . . . . . . . . . . . . . 15
  95.  
  96.  
  97.                                        i
  98.  
  99.       Contents                                                          ii
  100.  
  101.  
  102.           2.4.22 PRESOLUTION  . . . . . . . . . . . . . . . . . . . . . 15
  103.           2.4.23 WIDTH  . . . . . . . . . . . . . . . . . . . . . . . . 15
  104.           2.4.24 PLOT . . . . . . . . . . . . . . . . . . . . . . . . . 15
  105.           2.4.25 PRINT  . . . . . . . . . . . . . . . . . . . . . . . . 15
  106.           2.4.26 RESET  . . . . . . . . . . . . . . . . . . . . . . . . 16
  107.           2.4.27 SAVE . . . . . . . . . . . . . . . . . . . . . . . . . 16
  108.           2.4.28 TITLE  . . . . . . . . . . . . . . . . . . . . . . . . 16
  109.           2.4.29 WAXES  . . . . . . . . . . . . . . . . . . . . . . . . 16
  110.           2.4.30 WFn  . . . . . . . . . . . . . . . . . . . . . . . . . 16
  111.           2.4.31 WGRID  . . . . . . . . . . . . . . . . . . . . . . . . 16
  112.  
  113.       3. Advanced Applications  . . . . . . . . . . . . . . . . . . . . 17
  114.         3.1 Root Finding  . . . . . . . . . . . . . . . . . . . . . . . 17
  115.         3.2 Multiple Domains  . . . . . . . . . . . . . . . . . . . . . 17
  116.         3.3 Interesting Functions . . . . . . . . . . . . . . . . . . . 18
  117.         3.4 "Artistic" Plots  . . . . . . . . . . . . . . . . . . . . . 19
  118.  
  119.       4. Use and Distribution of Mathplot . . . . . . . . . . . . . . . 20
  120.         4.1 Copyright Notice  . . . . . . . . . . . . . . . . . . . . . 21
  121.         4.2 Disclaimer  . . . . . . . . . . . . . . . . . . . . . . . . 21
  122.  
  123.       5. Other Software . . . . . . . . . . . . . . . . . . . . . . . . 22
  124.         5.1 Nonlin  . . . . . . . . . . . . . . . . . . . . . . . . . . 22
  125.         5.2 TSX-32 Operating System . . . . . . . . . . . . . . . . . . 23
  126.  
  127.       6. Software Order Form  . . . . . . . . . . . . . . . . . . . . . 24
  128.  
  129.       Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.                                    Chapter 1
  137.  
  138.                                  Using Mathplot
  139.  
  140.  
  141.  
  142.  
  143.  
  144.       1.1 Introduction
  145.  
  146.       Mathplot is a program for IBM-PC computers which allows  interactive
  147.       entry  and plotting of mathematical functions.  Some of the features
  148.       of Mathplot are listed below:
  149.  
  150.         . Direct entry of complicated mathematical functions using  normal
  151.           algebraic expressions with embedded operators and functions.
  152.  
  153.         . An  assortment  of  built-in  functions including trigonometric,
  154.           square root, log,  Gamma,  Bessel,  elliptic  integrals,  normal
  155.           probability distribution, etc.
  156.  
  157.         . The   ability   to  plot  four  types  of  functions:  cartesian
  158.           (Y=f(X));  parametric  cartesian  (Y=f(T)  and  X=f(T));   polar
  159.           (Radius=f(Angle));   and   parametric   polar  (Radius=f(T)  and
  160.           Angle=f(T)).
  161.  
  162.         . The ability to simultaneously plot up to four functions.
  163.  
  164.         . Automatic scaling and axis labeling.
  165.  
  166.         . The ability to save function  specifications  in  command  files
  167.           which then can be easily executed.
  168.  
  169.         . The ability to accept X-Y data points from an external file.
  170.  
  171.         . A command editor allows easy recall and editing of commands.
  172.  
  173.         . Printed   copies  of  plots  may  be  produced  on  HP  LaserJet
  174.           printers.
  175.  
  176.  
  177.       1.2 Installing Mathplot
  178.  
  179.       The Mathplot system consists of the following files:
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.                                        1
  189.  
  190.       Chapter 1. Using Mathplot                                          2
  191.  
  192.  
  193.           MATHPLOT.EXE -- The executable program.
  194.           MATHPLOT.FON -- Font file used for title and axis labels.
  195.           MATHPLOT.LJF -- Font file for HP LaserJet printer.
  196.           MATHPLOT.FUN -- Example functions
  197.           MATHPLOT.DOC -- Documentation file.
  198.           REGISTER.DOC -- Software registration form.
  199.  
  200.       To install Mathplot, copy the  files  into  the  directory  of  your
  201.       choice.   If  you  do  not  plan to generated hard copy output for a
  202.       LaserJet printer, you may delete  the  MATHPLOT.LJF  file.   If  the
  203.       MATHPLOT.FON   and  MATHPLOT.LJF  files  are  not  in  your  current
  204.       directory, you must place a command of the following  form  in  your
  205.       AUTOEXEC.BAT  file  to  tell  Mathplot  where  to  look for its font
  206.       files:
  207.  
  208.           SET MATHPLOT=directory
  209.  
  210.       Where "directory" is the name of the device and directory where  the
  211.       files  are  located.   For  example,  if  the files are located in a
  212.       directory named MATHPLOT on the C disk, the following command  could
  213.       be used:
  214.  
  215.           SET MATHPLOT=C:\MATHPLOT
  216.  
  217.  
  218.       1.3 Getting Started
  219.  
  220.       Mathplot  is  exceptionally  easy to use.  Although there are a fair
  221.       number of commands to control options,  you  only  need  to  know  a
  222.       couple of commands to begin using it.
  223.  
  224.       Start the program by entering the command:
  225.  
  226.           MATHPLOT
  227.  
  228.       Mathplot  will  display  a  title  screen; press Enter to proceed to
  229.       command mode.  The  main  Mathplot  screen  is  divided  into  three
  230.       sections.   The  top  window explains the function keys.  The bottom
  231.       window is used to display status and  error  messages.   The  middle
  232.       window  is  used  by the command editor to display commands that you
  233.       enter.
  234.  
  235.       Several of the common Mathplot operations can  be  performed  either
  236.       by  pressing  a function key or by typing a command.  These commands
  237.       are described below:
  238.  
  239.           Function key   Command   Action
  240.           ------------   -------   -----------------------------------
  241.               ESC         EXIT     Exit from Mathplot to DOS
  242.               F1          PLOT     Plot the current functions
  243.               F2                   Print current functions on LaserJet
  244.               F3          HELP     Display help menu
  245.               F4          RESET    Erase functions and reset Mathplot
  246.               F5                   Run an example
  247.  
  248.       Chapter 1. Using Mathplot                                          3
  249.  
  250.  
  251.       The F5 key executes built-in example plots.  Each time you press  F5
  252.       a  different  example  is displayed.  I suggest you use this feature
  253.       to display a few plots in order to get a feeling  for  how  Mathplot
  254.       works  and  what types of commands are used to produce plots.  Press
  255.       any key to continue with execution after you  finish  looking  at  a
  256.       plot.   Note  that after each example is completed the commands that
  257.       produced it are displayed on your screen.  By examining a  few  sets
  258.       of  example  commands  you  should be able to get a pretty good idea
  259.       about how to use Mathplot.
  260.  
  261.       Once you have used F5 to display some  plots,  it  is  time  to  try
  262.       entering  your  own commands.  Begin by specifying a simple function
  263.       to be plotted.  I suggest you enter the command:
  264.  
  265.           Y=SIN(X)
  266.  
  267.       You may use either upper or lower  case  letters  when  you  type  a
  268.       command.   Press Enter when you are finished typing the line.  Next,
  269.       press F1 to command Mathplot to evaluate this function and plot  the
  270.       results.
  271.  
  272.       You  should  see  a sine wave displayed on your screen.  Press Enter
  273.       to return to the  command  editor.   Now  let's  make  the  function
  274.       slightly more complicated by entering the command:
  275.  
  276.           Y=SIN(X)+SIN(3*X)/3
  277.  
  278.       This  replaces  the  previous  function definition.  Press F1 to see
  279.       this function  plotted.   If  you  make  a  mistake  when  typing  a
  280.       command,  use  the  arrow  and  editing  keys  such as Backspace and
  281.       Delete to correct your mistake, then press Enter  to  reexecute  the
  282.       command.
  283.  
  284.       So  far, the function has been evaluated over the interval (0,2*pi),
  285.       which is the initial default domain.  Use the following  command  to
  286.       change the domain to (-2*pi,2*pi):
  287.  
  288.           DOMAIN -2*PI,2*PI
  289.  
  290.       Also, use the following command to turn on grid line display:
  291.  
  292.           GRID ON
  293.  
  294.       Press F1 to display the plot.
  295.  
  296.       As  a  final  exercise, use the following command to define a second
  297.       function to be displayed simultaneously with the first one:
  298.  
  299.           Y2=SIN(X)
  300.  
  301.       And, again press F1 to display them.  You should see a  simple  sine
  302.       wave  (the Y2 function) superimposed on the previous function (the Y
  303.       function).  Press ESC to exit Mathplot and return to DOS.
  304.  
  305.       Chapter 1. Using Mathplot                                          4
  306.  
  307.  
  308.       1.4 Demonstration Command File
  309.  
  310.       The  Mathplot   distribution   includes   a   command   file   named
  311.       MATHPLOT.FUN  containing a number of interesting example plots.  You
  312.       can execute this command file by using the  Mathplot  "DO"  command,
  313.       or  by  specifying  the  command  file  on the invocation line.  The
  314.       following DOS command starts the Mathplot program and  instructs  it
  315.       to execute the commands stored in the file MATHPLOT.FUN:
  316.  
  317.           MATHPLOT MATHPLOT.FUN
  318.  
  319.  
  320.       1.5 Command Editor
  321.  
  322.       The  middle  window  of  the  main  Mathplot  screen  is used by the
  323.       command  editor  to  accept  and  display  commands  you  type.   In
  324.       addition  to  typing  commands,  you can also use the arrow keys and
  325.       other editing functions to recall,  edit,  and  reexecute  commands.
  326.       If  you  enter a command that has an error, a message will appear in
  327.       the bottom window.  You can use the up-arrow key to move the  cursor
  328.       up  to the previous line, edit it, and then reexecute it by pressing
  329.       Enter.  Each time you press Enter, the line in which the  cursor  is
  330.       positioned  is  executed.   Using the arrow keys to move up and down
  331.       does not execute commands.
  332.  
  333.       1.5.1 Function Keys
  334.  
  335.       The following function keys can be used with the command editor:
  336.  
  337.           Delete    -- Delete the character under the cursor.
  338.           Home      -- Move to the left end of the line.
  339.           End       -- Move to the right end of the line.
  340.           Page up   -- Move up to the previous page of commands.
  341.           Page down -- Move down to the next page of commands.
  342.           Insert    -- Switch between insert and overtype mode.
  343.  
  344.       1.5.2 Control Characters
  345.  
  346.       The following control  characters  can  be  used  with  the  command
  347.       editor:
  348.  
  349.           Enter     -- Execute the command line the cursor is on.
  350.           Backspace -- Delete the character to the left of the cursor.
  351.           Control-U -- Delete characters to the left of the cursor.
  352.           Control-D -- Delete all characters in the current line.
  353.  
  354.  
  355.       1.6 Function Specification
  356.  
  357.       Much  of  the  power  of Mathplot comes from its ability to evaluate
  358.       complicated functions entered  in  ordinary  algebraic  form.   This
  359.       section  explains  the  arithmetic  operators and built in functions
  360.       that are used to define a function.
  361.  
  362.       Chapter 1. Using Mathplot                                          5
  363.  
  364.  
  365.       1.6.1 Arithmetic Operators
  366.  
  367.       The following arithmetic operators may be used in expressions:
  368.  
  369.             +        addition
  370.             -        subtraction or unary minus
  371.             *        multiplication
  372.             /        division
  373.             ** or ^  exponentiation
  374.  
  375.       Exponentiation   has   the   highest   precedence,    followed    by
  376.       multiplication  and  division,  and  then  addition and subtraction.
  377.       Parentheses may be used to group terms.
  378.  
  379.       As a convenience, Mathplot allows you  to  omit  the  multiplication
  380.       operator  between  a  numeric  constant  and a following variable or
  381.       function.  For example,  the  expressions  "2pi",  and  "2  pi"  are
  382.       equivalent  to  "2*pi".   Similarly,  "5X"  is  equivalent to "5*X".
  383.       However, if you specify a number before the letter "E", it  will  be
  384.       taken  as  the  exponential form of a number (see below) rather than
  385.       the number times the constant E (base of natural logarithms).
  386.  
  387.       1.6.2 Numeric Constants
  388.  
  389.       Numeric constants may be written in their natural form (1,  0,  1.5,
  390.       .0003,  etc.)  or in exponential form, n.nnnEppp, where n.nnn is the
  391.       base value and ppp is  the  power  of  ten  by  which  the  base  is
  392.       multiplied.   For  example, the number 1.5E4 is equivalent to 15000.
  393.       All numbers are treated as "floating point"  values,  regardless  of
  394.       whether a decimal point is specified or not.
  395.  
  396.       1.6.3 Symbolic Constants
  397.  
  398.       There  are  two  numeric  constants  that  may  be  specified  using
  399.       symbolic names.  The symbolic name "PI" is equivalent to  the  value
  400.       of   pi,   3.14159...   Similarly,  the  symbolic  constant  "E"  is
  401.       equivalent to the base of natural logarithms, 2.7182818...
  402.  
  403.       1.6.4 Parameter values
  404.  
  405.       Mathplot allows you to use parameters  named  P0,  P1,  ...,  P9  in
  406.       function  definitions.  You can then assign values to the parameters
  407.       and replot the function without having to  retype  the  function  to
  408.       change  a  value.   To  assign  a  value  to  a  parameter, type the
  409.       parameter name as a command followed by the value  to  be  assigned.
  410.       For  example,  the  following  command assigns the value 0.67 to the
  411.       parameter P0:
  412.  
  413.           P0  0.67
  414.  
  415.       Note that parameters are like constants during  the  evaluation  and
  416.       plotting  of a function (i.e., their values do not change).  But you
  417.       can assign new values to parameters between plot  generations.   For
  418.       example,  consider  the  following  commands which define a function
  419.  
  420.       Chapter 1. Using Mathplot                                          6
  421.  
  422.  
  423.       and then  plot  it  twice  with  two  different  values  of  the  P0
  424.       parameter:
  425.  
  426.           Y = EXP(-P0*X) * COS(X)
  427.           P0  0.6
  428.           PLOT
  429.           P0  0.8
  430.           PLOT
  431.  
  432.       This  function  represents  the response of a damped oscillator with
  433.       the P0 coefficient controlling the damping factor.  By changing  the
  434.       value  of  the  P0  parameter you can examine different forms of the
  435.       function without having to retype the function.
  436.  
  437.  
  438.       1.7 Built in Functions
  439.  
  440.       The following functions are built into Mathplot and may be  used  in
  441.       expressions:
  442.  
  443.       ABS(x) -- Absolute value of x.
  444.  
  445.       ACOS(x) -- Arc cosine of x.  Angles are measured in radians.
  446.  
  447.       ASIN(x) -- Arc sine of x.  Angles are measured in radians.
  448.  
  449.       ATAN(x) -- Arc tangent of x.  Angles are measured in radians.
  450.  
  451.       BETAI(x,a,b)  --  Incomplete beta function: Ix(a,b).  The incomplete
  452.           beta function can be used to compute a  variety  of  statistical
  453.           functions.   For  example,  the  probability of Student's t with
  454.           `df'   degrees    of    freedom    can    be    computed    with
  455.           BETAI(df/(df+t^2),.5*df,.5).    The   probability   of   the   F
  456.           statistic with df1 and df2 degrees of freedom  can  be  computed
  457.           with
  458.  
  459.               2*BETAI(df2/(df2+df1*f),.5*df2,.5*df1).
  460.  
  461.       COS(x) -- Cosine of x.  Angles are measured in radians.
  462.  
  463.       COSH(x) -- Hyperbolic cosine of x.
  464.  
  465.       COT(x) -- Cotangent of x.  (COT(x) = 1/TAN(x)).
  466.  
  467.       CSC(X) -- Cosecant of x.  (CSC(x) = 1/SIN(x)).
  468.  
  469.       DEG(x)  --  Converts  an  angle,  x,  measured  in  radians  to  the
  470.           equivalent number of degrees.
  471.  
  472.       EI1(alpha,phi) -- Elliptic integral of  the  first  kind.   Computes
  473.           the   integral   from   0   to   phi  radians  of  the  function
  474.           d.phi/sqrt(1-k**2*sin(phi)**2), where  k  =  sin(alpha).   alpha
  475.           and phi must be in the range 0 to pi/2.
  476.  
  477.       Chapter 1. Using Mathplot                                          7
  478.  
  479.  
  480.       EI2(alpha,phi)  --  Elliptic  integral of the second kind.  Computes
  481.           the  integral  from  0  to   phi   radians   of   the   function
  482.           sqrt(1-k**2*sin(phi)**2)*d.phi,  where  k  =  sin(alpha).  alpha
  483.           and phi must be in the range 0 to pi/2.
  484.  
  485.       EIC1(alpha)  --  Complete  elliptic  integral  of  the  first  kind.
  486.           Computes  the  integral  from  0 to pi/2 radians of the function
  487.           d.phi/sqrt(1-k**2*sin(phi)**2), where  k  =  sin(alpha).   alpha
  488.           must be in the range 0 to (less than) pi/2.
  489.  
  490.       EIC2(alpha)  --  Complete  elliptic  integral  of  the  second kind.
  491.           Computes the integral from 0 to pi/2  radians  of  the  function
  492.           sqrt(1-k**2*sin(phi)**2)*d.phi,  where  k  =  sin(alpha).  alpha
  493.           must be in the range 0 to pi/2.
  494.  
  495.       ERF(x) -- Standard error function of x.
  496.  
  497.       EXP(x) -- e (base of natural logarithms) raised to the x power.
  498.  
  499.       FAC(x) -- x factorial (x!).  Note,  the  FAC  function  is  computed
  500.           using  the  GAMMA  function  (FAC(x)=GAMMA(x+1))  so non-integer
  501.           argument values may be computed.
  502.  
  503.       GAMMA(x) -- Gamma function.  Note, GAMMA(x+1) = x!  (x factorial).
  504.  
  505.       GAMMAI(x) -- Reciprocal of GAMMA function (GAMMAI(x) = 1/GAMMA(x)).
  506.  
  507.       GAMMALN(x) -- Log (base e) of the GAMMA function.
  508.  
  509.       HAV(x) -- Haversine of x.  (HAV(x) = (1-COS(x))/2).
  510.  
  511.       J0(x) -- Bessel function of the first kind, order zero.
  512.  
  513.       J1(x) -- Bessel function of the first kind, order one.
  514.  
  515.       JN(n,x) -- Bessel function of the first kind, order n.
  516.  
  517.       LOG(x) -- Natural logarithm of x.
  518.  
  519.       LOG10(x) -- Base 10 logarithm of x.
  520.  
  521.       MAX(x1,x2) -- Maximum value of x1 or x2.
  522.  
  523.       MIN(x1,x2) -- Minimum value of x1 or x2.
  524.  
  525.       NORMAL(x) -- Normal probability distribution of x.  X  is  in  units
  526.           of  standard deviations from the mean.  See also the description
  527.           of the NPD function.  NORMAL(x) = NPD(x,0,1).
  528.  
  529.       NPD(x,mean,std)  --  Normal  probability  distribution  of  x   with
  530.           specified  mean  and  standard  deviation.   X  is  in  units of
  531.           standard deviations from the mean.
  532.  
  533.       Chapter 1. Using Mathplot                                          8
  534.  
  535.  
  536.       PAREA(x) -- Area under the  normal  probability  distribution  curve
  537.           from  -infinity  to  x.   (i.e., integral from -infinity to x of
  538.           NORMAL(x)).
  539.  
  540.       PULSE(a,x,b) -- Pulse function.  If the value of x is  less  than  a
  541.           or  greater  than  b,  the  value of the function is 0.  If x is
  542.           greater than or equal to a and less than  or  equal  to  b,  the
  543.           value  of  the  function  is 1.  In other words, it is 1 for the
  544.           domain (a,b) and zero elsewhere.  If you need  a  function  that
  545.           is  zero in the domain (a,b) and 1 elsewhere, use the expression
  546.           (1-PULSE(a,x,b)).
  547.  
  548.       RAD(x) -- Converts an angle measured in degrees  to  the  equivalent
  549.           number of radians.
  550.  
  551.       SEC(x) -- Secant of x.  (SEC(x) = 1/COS(x)).
  552.  
  553.       SIN(x) -- Sine of x.  Angles are measured in radians.
  554.  
  555.       SINH(x) -- Hyperbolic sine of x.
  556.  
  557.       SQRT(x) -- Square root of x.
  558.  
  559.       STEP(a,x)  --  Step function.  If x is less than a, the value of the
  560.           function is 0.  If x is greater than or equal to  a,  the  value
  561.           of  the  function is 1.  If you need a function which is 1 up to
  562.           a  certain  value  and  then  0  beyond  that  value,  use   the
  563.           expression STEP(x,a).
  564.  
  565.       T(n,x) -- Chebyshev polynomial of order n.
  566.  
  567.       TAN(x) -- Tangent of x.  Angles are measured in radians.
  568.  
  569.       TANH(x) -- Hyperbolic tangent of x.
  570.  
  571.       Y0(x) -- Bessel function of the second kind, order zero.
  572.  
  573.       Y1(x) -- Bessel function of the second kind, order one.
  574.  
  575.       YN(n,x) -- Bessel function of the second kind, order n.
  576.  
  577.  
  578.       1.8 Function Types
  579.  
  580.       Mathplot  allows  four  different  types of functions to be plotted:
  581.       cartesian, parametric cartesian, polar, and parametric polar.   Each
  582.       of the function types is described below:
  583.  
  584.       1.8.1 Cartesian Functions
  585.  
  586.       A   cartesian   function  has  the  form  Y=f(X),  where  X  is  the
  587.       independent variable that is plotted along the horizontal  axis  and
  588.       Y  is  the  dependent  variable  plotted  on the vertical axis.  The
  589.       value specified with the DOMAIN command controls the interval  of  X
  590.  
  591.       Chapter 1. Using Mathplot                                          9
  592.  
  593.  
  594.       values  over which the function is evaluated.  Some examples of this
  595.       type of function are listed below:
  596.  
  597.           Y=SIN(X)
  598.           Y=2*X**2-3*X+5
  599.           Y=SIN(X)/EXP(X)
  600.           Y=1/SQRT(2*(X+1))
  601.  
  602.       1.8.2 Parametric Cartesian Functions
  603.  
  604.       Parametric functions use a third variable, which we will call T,  as
  605.       the  independent  variable.   Both  X  and Y are dependent variables
  606.       defined as functions of T.  The value  of  the  T  variable  is  not
  607.       directly  displayed  on  the  plot but is used only in the functions
  608.       that define the values of the X and Y variables  that  are  plotted.
  609.       For  example,  the following commands define X and Y as functions of
  610.       T:
  611.  
  612.           X=COS(T)
  613.           Y=SIN(T)
  614.  
  615.       When  parametric  functions  are  defined,  the   DOMAIN   statement
  616.       specifies  the  interval  over which the T variable is computed.  If
  617.       the two functions of X and Y specified above are  plotted  over  the
  618.       domain  (0,2*PI),  the  result  is  a  circle with radius 1 centered
  619.       around the origin.
  620.  
  621.       1.8.3 Polar Functions
  622.  
  623.       A polar function specifies the distance (or radius) of a point  from
  624.       the  origin as a function of the angle swept around the origin.  The
  625.       angle (A) is the independent variable and  the  radius  (R)  is  the
  626.       dependent  variable.  The DOMAIN statement specifies the interval of
  627.       values that the angle is to be evaluated over.  The angle begins  on
  628.       the  positive  X axis; positive angles are measured counterclockwise
  629.       around the origin.  Angles are measured in radians; the RAD and  DEG
  630.       functions  can  be used to convert between degrees and radians.  The
  631.       simplest polar function is
  632.  
  633.           R=1
  634.  
  635.       which specifies that for all  angles  the  radius  is  1.   If  this
  636.       function  is plotted over the domain (0,2*pi) the result is a circle
  637.       of radius 1  centered  around  the  origin.   Another  simple  polar
  638.       function is
  639.  
  640.           R=A
  641.  
  642.       which defines a spiral with the radius increasing with the angle.
  643.  
  644.       1.8.4 Parametric Polar Functions
  645.  
  646.       A  parametric polar function defines the radius (R) and angle (A) as
  647.       functions of the  parametric  variable,  T.   The  DOMAIN  statement
  648.       defines  the  interval  of  T  values  over  which  the  function is
  649.  
  650.       Chapter 1. Using Mathplot                                         10
  651.  
  652.  
  653.       evaluated.  The following  is  an  example  of  a  parametric  polar
  654.       function definition:
  655.  
  656.           R=COS(T)
  657.           A=SIN(T)
  658.  
  659.       Over the domain (0,2*pi), this produces a figure-eight pattern.
  660.  
  661.  
  662.       1.9 Plotting Simultaneous Functions
  663.  
  664.       Up  to  four  functions  may  be  plotted  at  the  same time.  When
  665.       defining multiple  functions,  add  a  single-digit  suffix  to  the
  666.       dependent   variable  name  for  the  function.   For  example,  the
  667.       following   commands   define   four   functions   to   be   plotted
  668.       simultaneously:
  669.  
  670.           Y1=SIN(X)
  671.           Y2=COS(X)
  672.           Y3=SIN(2*X)
  673.           Y4=COS(2*X)
  674.  
  675.       If  no  number  is  specified,  the  default  value is 1.  Thus, the
  676.       following two function definitions are equivalent:
  677.  
  678.           Y=2*X**2
  679.           Y1=2*X**2
  680.  
  681.       You can remove a function definition by  defining  another  function
  682.       for  the  same  dependent  variable  or  by specifying the dependent
  683.       variable without a function.  For  example,  the  following  command
  684.       removes the definition for Y2:
  685.  
  686.           Y2
  687.  
  688.       When  a  function  of a type (cartesian, polar, etc.) different from
  689.       the current type is defined, all of the currently defined  functions
  690.       are removed.
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.                                    Chapter 2
  698.  
  699.                                Mathplot Commands
  700.  
  701.  
  702.  
  703.  
  704.       The   commands  described  in  this  section  are  used  to  control
  705.       Mathplot.  When Mathplot is waiting for a  command,  the  cursor  is
  706.       positioned in the middle window of the screen.
  707.  
  708.       If  you  need  to  type a command that is longer than a single line,
  709.       you may continue a command by  typing  a  minus  sign  as  the  last
  710.       character  on  the  line to be continued.  Note that a minus sign as
  711.       the last character on  a  line  is  interpreted  by  Mathplot  as  a
  712.       continuation  marker.   It  is  NOT  used  as  a  minus  sign in the
  713.       expression.
  714.  
  715.       Commands may be abbreviated to the  first  three  letters  of  their
  716.       keyword.  Commands may be typed using upper or lower case letters.
  717.  
  718.       You  may  place  comments on commands by preceding the comment by an
  719.       exclamation  point.   For  example,  the  following  commands   have
  720.       comments:
  721.  
  722.           ! Define square wave function
  723.           Y=SIN(X)+SIN(3*X)/3       ! Approximate square wave
  724.           DOMAIN 0,2*PI             ! One cycle of the function
  725.  
  726.  
  727.       2.1 Startup Command File
  728.  
  729.       The DOS command to start Mathplot is:
  730.  
  731.           MATHPLOT  [filename]
  732.  
  733.       where  "filename"  is an optional parameter specifying the name of a
  734.       file containing commands to be executed by Mathplot as  soon  as  it
  735.       is  started.   This  startup  command  file  may contain one or more
  736.       complete sets of statements to define functions and plot them.   The
  737.       default  file extension is ".FUN".  See also the descriptions of the
  738.       DO and  SAVE  commands  for  additional  information  about  command
  739.       files.
  740.  
  741.  
  742.       2.2 Initialization file
  743.  
  744.       Each  time  Mathplot  is  started  it  attempts to open a file named
  745.       MATHPLOT.INI.   If  this  file  exists,  all  commands  in  it   are
  746.       executed.   You  may  create  such  a file to contain initialization
  747.  
  748.  
  749.                                        11
  750.  
  751.       Chapter 2. Mathplot Commands                                      12
  752.  
  753.  
  754.       commands to set default values.  For example, if you  normally  like
  755.       to  have  grid  lines  turned  on,  create a file named MATHPLOT.INI
  756.       containing the command "GRID ON".   Mathplot  looks  for  this  file
  757.       first  in  the current directory and if it does not find it there it
  758.       checks to see if a MATHPLOT environment variable  has  been  defined
  759.       to  specify a directory.  The initialization file is executed before
  760.       any file specified on the command that starts Mathplot.
  761.  
  762.  
  763.       2.3 Command Arguments
  764.  
  765.       Many of the commands accept numeric arguments.  In the  descriptions
  766.       below,  the  notation  "cexpr"  is shown wherever a numeric argument
  767.       may be specified.  These numeric arguments may consist  of  numbers,
  768.       symbolic  constants,  and  expressions  using operators and built in
  769.       functions.  For example, the following is a valid DOMAIN command:
  770.  
  771.           DOMAIN -2*PI,PI*SQRT(2)
  772.  
  773.       The argument expressions may NOT contain variables such as X, Y,  R,
  774.       A, or T, or parameters such as P0 or P1.
  775.  
  776.       Arguments  shown  in  brackets are optional.  Braces around a set of
  777.       options indicate that you must choose one  of  the  options  in  the
  778.       set.
  779.  
  780.  
  781.       2.4 Alphabetical List of Commands
  782.  
  783.       2.4.1 AXES
  784.  
  785.       AXES  {ON  | OFF} (default=ON) -- Specifies whether to display axes.
  786.       Use  the  LABELS  command  to  control  whether  axis   labels   are
  787.       displayed.
  788.  
  789.       2.4.2 CALCULATE
  790.  
  791.       CALCULATE  cexpr  --  Evaluate  the specified expression, which must
  792.       contain  only  numbers,  operators,  and  built  in  functions,  and
  793.       display the result in the bottom window.
  794.  
  795.       2.4.3 CAXES
  796.  
  797.       CAXES  cexpr  (default=3)  --  Specify  the color to be used for the
  798.       axis lines and labels.
  799.  
  800.       2.4.4 CFn
  801.  
  802.       CFn cexpr (default=2,1,4,3) -- Define the  color  to  be  used  when
  803.       plotting  function  'n'.  For example, the command "CF1 3" specifies
  804.       that color 3 is to be used when plotting function 1.
  805.  
  806.       Chapter 2. Mathplot Commands                                      13
  807.  
  808.  
  809.       2.4.5 CGRID
  810.  
  811.       CGRID cexpr (default=8) -- Specify the color to  be  used  for  grid
  812.       lines.
  813.  
  814.       2.4.6 COMMONSCALE
  815.  
  816.       COMMONSCALE  {ON  |  OFF}  (default=OFF) -- If this option is turned
  817.       on, the X and Y directions are forced to have the  same  scale.   If
  818.       this  option  is  off,  the X and Y ranges are scaled independently,
  819.       which may cause figures to be distorted - for example, a circle  may
  820.       display  as  an ellipse.  However, turning this option on may result
  821.       in one of the dimensions using only a small portion  of  the  screen
  822.       if  the X and Y ranges are very different.  This option is always on
  823.       for polar function plots.
  824.  
  825.       2.4.7 CTITLE
  826.  
  827.       CTITLE cexpr (default=7) -- Specify the color to use for  the  title
  828.       line.
  829.  
  830.       2.4.8 DATA
  831.  
  832.       DATA  filename  --  Causes  X  and  Y data values to be read from an
  833.       external file rather than being computed from function  definitions.
  834.       After  the  data  has been read, use the PLOT command to display it.
  835.       Any function  definition  following  this  command  will  clear  the
  836.       external  data  values  and  revert to function mode.  Each X,Y data
  837.       pair must be specified as a separate line in the file with  a  space
  838.       separating  the X value from the Y value.  The default extension for
  839.       the file is ".DAT".
  840.  
  841.       2.4.9 DISPLAY
  842.  
  843.       DISPLAY string -- Display the string in the  bottom  window  of  the
  844.       screen.   The  string  is displayed for 3 seconds.  This command may
  845.       be placed in command file to cause information to be  printed  while
  846.       the command file is being processed.
  847.  
  848.       2.4.10 DO
  849.  
  850.       DO  filename  -- Execute the Mathplot commands stored in an external
  851.       file.   This  allows  you  to  specify  a  complete  plot   request,
  852.       including  functions and options, and then execute it without having
  853.       to retype the commands.  An external file may itself  contain  a  DO
  854.       command  and  this  nesting may be performed to a depth of 10 files.
  855.       The default file extension is  ".FUN".   Use  the  LIST  command  to
  856.       control  whether  the commands in the file are displayed in the edit
  857.       window.  See also the description of the SAVE command.
  858.  
  859.       2.4.11 DOMAIN
  860.  
  861.       DOMAIN cexpr1,cexpr2 (default=0,2*pi) -- Define the  domain  of  the
  862.       independent  variable  over  which  the  functions are evaluated and
  863.       plotted.  This command may be abbreviated to "DOM".
  864.  
  865.       Chapter 2. Mathplot Commands                                      14
  866.  
  867.  
  868.       2.4.12 EXIT
  869.  
  870.       EXIT -- Stop Mathplot and return to DOS.   Pressing  ESC  will  also
  871.       cause Mathplot to exit.
  872.  
  873.       2.4.13 GRID
  874.  
  875.       GRID  {ON  | OFF} (default=OFF) -- Specify whether grid lines are to
  876.       be displayed.
  877.  
  878.       2.4.14 HELP
  879.  
  880.       HELP -- Display the help menu.  You can also  do  this  by  pressing
  881.       F3.
  882.  
  883.       2.4.15 LABEL
  884.  
  885.       LABEL  {ON | OFF} (default=ON) -- Specify whether axis labels are to
  886.       be displayed.
  887.  
  888.       2.4.16 LIST
  889.  
  890.       LIST {ON | OFF} (default=OFF) -- Specify whether  commands  executed
  891.       from  an external file by subsequent use of the DO command are to be
  892.       listed as they are executed.
  893.  
  894.       2.4.17 NUMPOINTS
  895.  
  896.       NUMPOINTS cexpr (default=100) -- Specify the  number  of  points  at
  897.       which   the   functions   are  to  be  evaluated  over  the  domain.
  898.       Specifying a larger number of points results in a smoother plot  but
  899.       increases  the  computation time.  The maximum number of points that
  900.       may be computed is 2000.  This command may  be  abbreviated  to  the
  901.       single letter 'N'.
  902.  
  903.       2.4.18 ORIGIN
  904.  
  905.       ORIGIN  {ON | OFF} (default=OFF) -- Specify whether the origin (0,0)
  906.       is to be forced to be included in the plot.  If this option  is  off
  907.       and  the range of values does not span 0, then the origin may not be
  908.       displayed.  Turning this option on allows the range of the  function
  909.       relative  to  the  origin  to be observed, but may result in a small
  910.       scale factor if the range is far from the origin.
  911.  
  912.       2.4.19 Pn
  913.  
  914.       Pn cexpr -- Specify a value for parameter Pn where  'n'  is  in  the
  915.       range  0  to  9.   Mathplot  allows  you  to use up to ten parameter
  916.       values in function specifications.  The  parameters  are  named  P0,
  917.       P1,  ...,  P9.  You can assign a new value to a parameter and replot
  918.       the function without having to retype the function.
  919.  
  920.       Chapter 2. Mathplot Commands                                      15
  921.  
  922.  
  923.       2.4.20 PAUSE
  924.  
  925.       PAUSE [cexpr] (default=0)  --  This  command  may  be  placed  in  a
  926.       command  file  to cause execution to pause until a key is pressed or
  927.       the specified number of seconds elapse.  If cexpr is omitted or  has
  928.       the  value 0, execution pauses for an indefinite time until a key is
  929.       pressed.
  930.  
  931.       2.4.21 PDEVICE
  932.  
  933.       PDEVICE device (default=PRN) -- Allows you to specify the device  or
  934.       file  to  which printer output is written when printing is turned on
  935.       by use of the PRINT ON command.  The default  device  is  "PRN"  but
  936.       you  may  specify  another device such as LPT2 or COM.  You may also
  937.       direct output to a disk file that you can printer  later  using  the
  938.       DOS PRINT or COPY commands.
  939.  
  940.       2.4.22 PRESOLUTION
  941.  
  942.       PRESOLUTION  value  (default=150) -- Specifies whether plots sent to
  943.       HP LaserJet printers should use 150 or 300 dot-per-inch  resolution.
  944.       The  value  parameter  must be 150 or 300.  The default value is 150
  945.       causes the plots to use most of the horizontal width  of  an  8.5x11
  946.       inch  page.   These  plots  are  suitable  for  direct  transfer  to
  947.       overhead  transparencies.   Specifying  300   for   the   resolution
  948.       produces  smaller  plots  that are suitable for inclusion in printed
  949.       documents.
  950.  
  951.       2.4.23 WIDTH
  952.  
  953.       WIDTH value (optional) -- Specify the width, in inches,  of  printed
  954.       plots.   Due  to  memory  space considerations, the maximum width is
  955.       limited to about 7.9 inches for 150 DPI resolution  and  4.5  inches
  956.       for  300  DPI resolution.  If you have limited memory space, you may
  957.       have to reduce the width to be able to produce printed plots.   This
  958.       statement is ignored unless you request that a plot be printed.
  959.  
  960.       2.4.24 PLOT
  961.  
  962.       PLOT   [cexpr]   (default=0)   --  Evaluate  the  currently  defined
  963.       functions  and  plot  them.   If  an  optional  value   (cexpr)   is
  964.       specified,  the  function  is  displayed for the specified number of
  965.       seconds or until a  key  is  pressed.   If  the  optional  value  is
  966.       omitted  or  is  zero,  the plot is displayed for an indefinite time
  967.       until a key is pressed.  The use  of  the  optional  value  is  most
  968.       useful  when  the  PLOT command occurs in a command file producing a
  969.       "slide show" of functions.  You can also  plot  the  function(s)  by
  970.       pressing F1.
  971.  
  972.       2.4.25 PRINT
  973.  
  974.       PRINT  {ON  |  OFF} (default=OFF) -- Turns printer output on or off.
  975.       When turned on, any plot displayed on the screen is also written  to
  976.       the  printer  (or  file  as  directed  by  the PDEVICE command).  To
  977.  
  978.       Chapter 2. Mathplot Commands                                      16
  979.  
  980.  
  981.       produce a printed copy of the currently  defined  function(s)  press
  982.       F2.
  983.  
  984.       2.4.26 RESET
  985.  
  986.       RESET  --  Reset  all parameters and options to their initial values
  987.       and remove all function definitions.   You  can  also  perform  this
  988.       function by pressing F4.
  989.  
  990.       2.4.27 SAVE
  991.  
  992.       SAVE  filename  --  Write  the  current function definitions and the
  993.       values of all options and parameters to the specified file.  The  DO
  994.       command  can then be used at a later time to redisplay the function.
  995.       The default file extension is ".FUN".
  996.  
  997.       2.4.28 TITLE
  998.  
  999.       TITLE string -- Define a title line to be displayed at  the  top  of
  1000.       the plot.
  1001.  
  1002.       2.4.29 WAXES
  1003.  
  1004.       WAXES  cexpr  (default=3) -- Specify the width (in dots) of the axis
  1005.       lines for printed  output.   This  parameter  does  not  affect  the
  1006.       screen display.
  1007.  
  1008.       2.4.30 WFn
  1009.  
  1010.       WFn  cexpr  (default=3)  --  Specify the width (in dots) of the line
  1011.       used to draw the plot of function 'n'.  This only affects hard  copy
  1012.       output.
  1013.  
  1014.       2.4.31 WGRID
  1015.  
  1016.       WGRID  cexpr  (default=1) -- Specify the width (in dots) of the grid
  1017.       lines.  This only affects hard copy output.
  1018.  
  1019.  
  1020.  
  1021.  
  1022.  
  1023.  
  1024.                                    Chapter 3
  1025.  
  1026.                              Advanced Applications
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.       3.1 Root Finding
  1033.  
  1034.       Mathplot can be used to find the roots of equations.   To  do  this,
  1035.       turn  on  axis  labeling  (LABEL  ON) and plot the function over the
  1036.       domain in which a root occurs.  Observe the approximate X  value  at
  1037.       which  the  function crosses the X axis and then reset the domain to
  1038.       closely span the crossing point.  Replot the function and  obtain  a
  1039.       new  X  estimate.   After  several  iterations  you  will be able to
  1040.       determine the root to several significant digits.  For example,  use
  1041.       this technique to find the root of the function:
  1042.  
  1043.           Y = X^4 - EXP(X)
  1044.  
  1045.       in the domain (2,9.5).
  1046.  
  1047.       For  a  course in Algebra I, Mathplot can be used to demonstrate the
  1048.       graphical method of solving two  simultaneous  linear  equations  by
  1049.       locating  the  point  of  intersection.   For  an Algebra II course,
  1050.       Mathplot can be used  to  locate  minimum  and  maximum  points  for
  1051.       quadratic and cubic equations.
  1052.  
  1053.  
  1054.       3.2 Multiple Domains
  1055.  
  1056.       Mathplot  only allows specification of a single continuous domain of
  1057.       values.   However,  by  using   the   multiple   function   plotting
  1058.       capability  it  is  sometimes possible to simulate multiple domains.
  1059.       For example, the function X*Y=5 defines a  hyperbola  with  branches
  1060.       in  both  the  positive  X-Y  domain  (upper right quadrant) and the
  1061.       negative X-Y domain (lower left quadrant).   The  following  set  of
  1062.       commands  defines  two  parametric  functions  to  draw  each of the
  1063.       branches:
  1064.  
  1065.           X1=T
  1066.           Y1=5/T
  1067.           X2=-T
  1068.           Y2=-5/T
  1069.           DOMAIN 0.5,10
  1070.           LABEL ON
  1071.           COMMONSCALE ON
  1072.           PLOT
  1073.  
  1074.  
  1075.  
  1076.                                        17
  1077.  
  1078.       Chapter 3. Advanced Applications                                  18
  1079.  
  1080.  
  1081.       3.3 Interesting Functions
  1082.  
  1083.       The  following  specifications  plot  interesting   and   attractive
  1084.       functions:
  1085.  
  1086.           TITLE Four Leaved Rose
  1087.           CTITLE 4
  1088.           R=2*SIN(2*A)
  1089.           CF1 3
  1090.           DOMAIN 0,2*PI
  1091.           NUMPOINTS 150
  1092.           AXES ON
  1093.           CAXES 1
  1094.           PLOT
  1095.  
  1096.           TITLE Prolate Cycloid
  1097.           CTITLE 4
  1098.           Y=1-2*COS(T)
  1099.           X=T-2*SIN(T)
  1100.           CF1 2
  1101.           DOMAIN -4*PI,4*PI
  1102.           NUMPOINTS 400
  1103.           CAXES 1
  1104.           COMMONSCALE ON
  1105.           PLOT
  1106.  
  1107.           TITLE Hypocycloid of four cusps (Asteroid)
  1108.           CTITLE 4
  1109.           Y=SIN(T)^3
  1110.           X=COS(T)^3
  1111.           CF1 2
  1112.           DOMAIN 0,2*PI
  1113.           NUMPOINTS 100
  1114.           AXES ON
  1115.           CAXES 1
  1116.           COMMONSCALE ON
  1117.           PLOT
  1118.  
  1119.           TITLE Bifolium
  1120.           CTITLE 4
  1121.           Y=2*SIN(T)^2*COS(T)^2
  1122.           X=2*SIN(T)*COS(T)^3
  1123.           CF1 3
  1124.           DOMAIN 0,2*PI
  1125.           NUMPOINTS 100
  1126.           AXES ON
  1127.           CAXES 1
  1128.           COMMONSCALE ON
  1129.           PLOT
  1130.  
  1131.       Chapter 3. Advanced Applications                                  19
  1132.  
  1133.  
  1134.           TITLE Epicycloid
  1135.           CTITLE 4
  1136.           Y=5*SIN(T)-SIN(5*T)
  1137.           X=5*COS(T)-COS(5*T)
  1138.           CF1 3
  1139.           DOMAIN 0,2*PI
  1140.           NUMPOINTS 150
  1141.           AXES ON
  1142.           CAXES 1
  1143.           COMMONSCALE ON
  1144.           PLOT
  1145.  
  1146.  
  1147.       3.4 "Artistic" Plots
  1148.  
  1149.       When  Mathplot  plots  a  function, it evaluates the function at the
  1150.       number of points specified by the last NUMPOINTS  command  and  then
  1151.       connects  the  points  together using straight lines.  By specifying
  1152.       very large domain values for  polar  or  parametric  functions,  the
  1153.       lines  connecting  the  points  span  large  distances  and  produce
  1154.       interesting and "artistic" plots.  It  is  best  to  turn  off  axis
  1155.       display   (AXES   OFF,  LABELS  OFF)  and  turn  on  common  scaling
  1156.       (COMMONSCALE ON) for these plots.  Here are some examples to try:
  1157.  
  1158.           Y=SIN(T)^3
  1159.           X=COS(T)^3
  1160.           CF1 2
  1161.           DOMAIN 0,4000
  1162.           NUMPOINTS 500
  1163.  
  1164.           R=2*SIN(2*A)
  1165.           CF1 3
  1166.           DOMAIN 0,2000
  1167.           NUMPOINTS 500
  1168.  
  1169.           Y=5*SIN(T)-SIN(5*T)
  1170.           X=5*COS(T)-COS(5*T)
  1171.           CF1 3
  1172.           DOMAIN 0,6000
  1173.           NUMPOINTS 400
  1174.  
  1175.       Parametric and polar functions seem to  produce  the  best  artistic
  1176.       plots.   By  varying the NUMPOINTS and DOMAIN values you can usually
  1177.       produce many different plots from the same functions.
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.                                    Chapter 4
  1185.  
  1186.                         Use and Distribution of Mathplot
  1187.  
  1188.  
  1189.  
  1190.  
  1191.       You are welcome to make copies of this program and pass them  on  to
  1192.       friends  or  post  this  program on bulletin boards or distribute it
  1193.       via disk catalog services provided the entire Mathplot  distribution
  1194.       is  included  in  its original, unmodified form.  A distribution fee
  1195.       may be charged for the cost of the diskette, shipping and  handling.
  1196.       However,  Mathplot  may  not  be  sold,  or  incorporated in another
  1197.       product  that  is  sold,  without  the  permission  of  Phillip   H.
  1198.       Sherrod.   Vendors  are  encouraged to contact the author to get the
  1199.       most recent version of Mathplot.
  1200.  
  1201.       As a shareware product, you are granted a no-cost, trial  period  of
  1202.       30  days  during  which  you  may  evaluate  Mathplot.   If you find
  1203.       Mathplot  to  be  useful,  educational,  and/or  entertaining,   and
  1204.       continue  to use it beyond the 30 day trial period, you are required
  1205.       to compensate the author by sending the  registration  form  printed
  1206.       on  page  24 (and in REGISTER.DOC) with the appropriate registration
  1207.       fee to help cover the development and support of Mathplot.
  1208.  
  1209.       In return for registering, you will be authorized to continue  using
  1210.       Mathplot  beyond  the  trial  period  and  you will receive the most
  1211.       recent version of the program, a laser-printed,  bound  manual,  and
  1212.       three  months  of  support via telephone, mail, or CompuServe.  Your
  1213.       registration fee will be refunded if you  encounter  a  serious  bug
  1214.       that cannot be corrected.
  1215.  
  1216.       See also the special offer for Nonlin on page 22.
  1217.  
  1218.       This  program  is  produced  by  a  member  of  the  Association  of
  1219.       Shareware Professionals (ASP).  ASP wants  to  make  sure  that  the
  1220.       shareware  principle  works for you.  If you are unable to resolve a
  1221.       shareware-related problem with  an  ASP  member  by  contacting  the
  1222.       member  directly,  ASP  may  be able to help.  The ASP Ombudsman can
  1223.       help you resolve a dispute or problem with an ASP member,  but  does
  1224.       not  provide  technical support for members' products.  Please write
  1225.       to the ASP Ombudsman at 545 Grover Road, Muskegon, MI 49442 or  send
  1226.       a   CompuServe   message   via  CompuServe  Mail  to  ASP  Ombudsman
  1227.       7007,3536.
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.                                        20
  1237.  
  1238.       Chapter 4. Use and Distribution of Mathplot                       21
  1239.  
  1240.  
  1241.       You are welcome to contact the author:
  1242.  
  1243.                                Phillip H. Sherrod
  1244.                                4410 Gerald Place
  1245.                           Nashville, TN 37205-3806 USA
  1246.                             615-292-2881 (evenings)
  1247.                              CompuServe: 76166,2640
  1248.                       Internet: 76166.2640@compuserve.com
  1249.  
  1250.  
  1251.       4.1 Copyright Notice
  1252.  
  1253.       Both the  Mathplot  program  and  documentation  are  copyright  (c)
  1254.       1991-1993  by Phillip H.  Sherrod.  You are not authorized to modify
  1255.       the program.  "Mathplot" is a trademark.
  1256.  
  1257.  
  1258.       4.2 Disclaimer
  1259.  
  1260.       Mathplot is provided "as is" without warranty of  any  kind,  either
  1261.       expressed   or   implied.   This  program  may  contain  "bugs"  and
  1262.       inaccuracies, and its results should not be assumed  to  be  correct
  1263.       unless  they  are verified by independent means.  The author assumes
  1264.       no  responsibility  for  the  use  of  Mathplot  and  will  not   be
  1265.       responsible for any damage resulting from its use.
  1266.  
  1267.  
  1268.  
  1269.  
  1270.  
  1271.  
  1272.                                    Chapter 5
  1273.  
  1274.                                  Other Software
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.       5.1 Nonlin
  1281.  
  1282.       If  you  like Mathplot, you should check out Nonlin -- the nonlinear
  1283.       regression analysis  program  by  the  same  author.   And,  if  you
  1284.       register  your  use  of  Mathplot and order Nonlin at the same time,
  1285.       you can get both for the special price of $40.
  1286.  
  1287.       What is regression analysis?  Regression analysis is a  mathematical
  1288.       technique  for  determining  the best values of parameters to fit an
  1289.       equation to a set of data points.  For example, you  might  want  to
  1290.       develop an equation of the form
  1291.  
  1292.           price = p0 + p1*age + p2*miles
  1293.  
  1294.       to  predict  the price of a used car based on its age and the number
  1295.       of miles driven.  With Nonlin you can collect data from car ads  and
  1296.       then perform the analysis using the following set of commands:
  1297.  
  1298.           VARIABLES PRICE,AGE,MILES
  1299.           PARAMETERS P0,P1,P2
  1300.           FUNCTION  PRICE = P0 + P1*AGE + P2*MILES
  1301.           DATA
  1302.  
  1303.       Nonlin  will  analyze  the data and determine the best values of the
  1304.       parameters P0, P1, and P2 to fit the data values.
  1305.  
  1306.       Ordinary linear regression programs  can  only  determine  parameter
  1307.       values  for  linear (straight line) equations.  Nonlin, on the other
  1308.       hand, can  handle  multivariate,  linear,  polynomial,  and  general
  1309.       nonlinear  equations.   For  example,  using  Nonlin  you can easily
  1310.       determine the best values for the parameters Offset, Amplitude,  and
  1311.       Frequency for an equation of the form:
  1312.  
  1313.           Y = Offset + Amplitude * sin(Frequency * X)
  1314.  
  1315.       Nonlin  uses  the  same  expression evaluator as Mathplot so you can
  1316.       model complicated equations using the  full  set  of  operators  and
  1317.       library functions available in Mathplot.
  1318.  
  1319.       Nonlin  comes  with  a  45  page  manual  that  explains  regression
  1320.       analysis and  gives  many  examples.   Nonlin  is  in  use  at  many
  1321.       universities and research labs around the world.
  1322.  
  1323.  
  1324.                                        22
  1325.  
  1326.       Chapter 5. Other Software                                         23
  1327.  
  1328.  
  1329.       5.2 TSX-32 Operating System
  1330.  
  1331.       If  you  have  a  need  for  a  multi-user,  multi-tasking operating
  1332.       system, you should look into TSX-32.   TSX-32  is  a  full-featured,
  1333.       high  performance,  multi-user  operating system for the 386 and 486
  1334.       that  provides  both  32-bit  and  16-bit  program  support.    With
  1335.       facilities  such  as  multitasking  and  multisessions,  networking,
  1336.       virtual memory, X-Windows, background batch  queues,  data  caching,
  1337.       file   access   control,  real-time,  and  dial-in  support,  TSX-32
  1338.       provides a solid environment for a wide range of applications.
  1339.  
  1340.       A two user, shareware version of  TSX-32  called  TSX-Lite  is  also
  1341.       available.
  1342.  
  1343.       TSX-32  is not a limited, 16-bit, multi-DOS add-on.  Rather, it is a
  1344.       complete 32-bit  operating  system  which  makes  full  use  of  the
  1345.       hardware's  potential,  including  protected mode execution, virtual
  1346.       memory, and demand paging.  TSX-32 sites range  from  small  systems
  1347.       with  2-3  terminals  to  large  installations  with  more  than  64
  1348.       terminals on a single 386.
  1349.  
  1350.       In addition to supporting most popular 16-bit DOS  programs,  TSX-32
  1351.       also  provides  a 32-bit "flat" address space with both Phar Lap and
  1352.       DPMI compatible modes of execution.
  1353.  
  1354.       Since the DOS  file  structure  is  standard  for  TSX-32,  you  can
  1355.       directly  read  and  write  DOS disks.  And, you can run DOS part of
  1356.       the time and TSX-32 the rest of the time on the same computer.
  1357.  
  1358.       TSX-32 allows each user to control up to 10 sessions.  Programs  can
  1359.       also  "fork" subtasks for multi-threaded applications.  The patented
  1360.       Adaptive Scheduling Algorithm provides  consistently  good  response
  1361.       time under varying conditions.
  1362.  
  1363.       The   TSX-32   network  option  provides  industry  standard  TCP/IP
  1364.       networking through Ethernet and serial lines.  Programs  can  access
  1365.       files  on  remote  machines  as easily as on their own machine.  The
  1366.       SET HOST command allows a user on one machine to  log  onto  another
  1367.       computer  in  the  network.   FTP, Telnet, and NFS are available for
  1368.       interoperability with other systems.
  1369.  
  1370.       TSX-32 is the best and most powerful operating system available  for
  1371.       the 386 and 486.  For additional information contact:
  1372.  
  1373.                            S&H Computer Systems, Inc.
  1374.                              1027 17th Avenue South
  1375.                             Nashville, TN 37212 USA
  1376.                               615-327-3670 (voice)
  1377.                                615-321-5929 (fax)
  1378.                               CompuServe: 71333,27
  1379.                        Internet: 71333.27@compuserve.com
  1380.  
  1381.         ===============================================================
  1382.                               Software Order Form
  1383.         ===============================================================
  1384.  
  1385.       Name ______________________________________________________
  1386.  
  1387.       Address ___________________________________________________
  1388.  
  1389.       City _______________________  State _______ Zip ___________
  1390.  
  1391.       Telephone _________________________________________________
  1392.  
  1393.       CompuServe account (optional) _____________________________
  1394.  
  1395.       Mathplot version (on title screen) ________________________
  1396.  
  1397.       Bulletin board where you found Mathplot ___________________
  1398.  
  1399.       Comments __________________________________________________
  1400.  
  1401.       Check the box below which indicates your order type:
  1402.  
  1403.           ___ I wish to register Mathplot ($20).
  1404.  
  1405.           ___ I wish to order Nonlin ($25).
  1406.  
  1407.           ___ I wish to register Mathplot and order Nonlin ($40).
  1408.  
  1409.       Add  $5  to  any amount shown above if the software is being shipped
  1410.       out of the United States.
  1411.  
  1412.       In return for registering, you will receive the most recent  version
  1413.       of  the  program,  a  laser-printed,  bound  copy of the manual, and
  1414.       three months of telephone or CompuServe support.  Your  registration
  1415.       fee  will  be  refunded  if  you  find  a serious bug that cannot be
  1416.       corrected.
  1417.  
  1418.       Distribution disk choice (check one):
  1419.  
  1420.             3.50" HD (1.4 MB)  ______
  1421.             5.25" HD (1.2 MB)  ______
  1422.             5.25" DD (360 KB)  ______
  1423.  
  1424.       Send this form with the amount indicated to the author:
  1425.  
  1426.                                Phillip H. Sherrod
  1427.                                4410 Gerald Place
  1428.                          Nashville, TN  37205-3806  USA
  1429.  
  1430.                             615-292-2881 (evenings)
  1431.                              CompuServe: 76166,2640
  1432.                       Internet: 76166.2640@compuserve.com
  1433.  
  1434.       Index                                                             25
  1435.  
  1436.  
  1437.       Abbreviating commands, 11           Epicycloid, 19
  1438.       ABS function, 6                     ERF function, 7
  1439.       ACOS function, 6                    EXIT command, 14
  1440.       Arc cosine, 6                       EXP function, 7
  1441.       Arc sine, 6                         Exponential, 7
  1442.       Arc tangent, 6                      Exponentiation operator, 5
  1443.       Artistic plots, 19                  External command file, 13
  1444.       ASIN function, 6                    External data file, 13
  1445.       ASP, 20                             FAC function, 7
  1446.       Asteroid, 18                        Factorial, 7
  1447.       ATAN function, 6                    Four leaved rose, 18
  1448.       AXES command, 12                    GAMMA function, 7
  1449.       Bessel function, 7, 8               GAMMALN function, 7
  1450.       Beta function, 6                    GAMMI function, 7
  1451.       BETAI function, 6                   Grid color, 13
  1452.       Bifolium, 18                        GRID command, 14
  1453.       Build-in functions, 6               HAV function, 7
  1454.       Calculate command, 12               Haversine, 7
  1455.       Cartesian functions, 8              HELP command, 14
  1456.       CAXES command, 12                   Hyperbolic cosine, 6
  1457.       CFn command, 12                     Hyperbolic sine, 8
  1458.       CGRID command, 13                   Hyperbolic tangent, 8
  1459.       Chebyshev polynomial, 8             Hypocycloid, 18
  1460.       Color                               Initialization file, 11
  1461.          of axes, 12                      Interesting functions, 18
  1462.          of function, 12                  Inverse gamma, 7
  1463.          of grid, 13                      J0 function, 7
  1464.          of title, 13                     J1 function, 7
  1465.       Comments, 11                        JN function, 7
  1466.       COMMONSCALE command, 13             LABEL command, 14
  1467.       Continuing lines, 11                LIST command, 14
  1468.       Copyright notice, 21                LOG function, 7
  1469.       COS function, 6                     Log gamma, 7
  1470.       Cosecant function, 6                LOG10 function, 7
  1471.       COSH function, 6                    Long lines, 11
  1472.       COT function, 6                     MATHPLOT.INI, 11
  1473.       Cotangent function, 6               MAX function, 7
  1474.       CSC function, 6                     MIN function, 7
  1475.       CTITLE command, 13                  Multiple domains, 17
  1476.       Curve fitting, 22                   Nonlin, 22
  1477.       Cycloid, 18                         Nonlinear regression, 22
  1478.       DATA command, 13                    NORMAL function, 7
  1479.       DEG function, 6                     NPD function, 7
  1480.       Device for output, 15               Numeric constants, 5
  1481.       Disclaimer, 21                      NUMPOINTS command, 14
  1482.       DISPLAY command, 13                 Operator precedence, 5
  1483.       DO command, 13                      Order form, 24
  1484.       DOMAIN command, 13                  ORIGIN command, 14
  1485.       Domains                             Parameter values, 5, 14
  1486.          multiple, 17                     Parametric functions, 9
  1487.       EI1 function, 6                     PAREA function, 7
  1488.       EI2 function, 7                     PAUSE command, 15
  1489.       EIC1 function, 7                    PDEVICE command, 15
  1490.       EIC2 function, 7                    PI constant, 5
  1491.       Elliptic integral, 6, 7             PLOT command, 15
  1492.  
  1493.       Index                                                             26
  1494.  
  1495.  
  1496.       Pn command, 14
  1497.       Polar functions, 9
  1498.       Precedence of operators, 5
  1499.       PRESOLUTION command, 15
  1500.       PRINT command, 15
  1501.       Printer resolution, 15
  1502.       Probability distribution, 7
  1503.       Prolate cycloid, 18
  1504.       PULSE function, 8
  1505.       RAD function, 8
  1506.       REGISTER.DOC, 20
  1507.       Registration form, 24
  1508.       Regression analysis, 22
  1509.       RESET command, 16
  1510.       Resolution of printer, 15
  1511.       Root finding, 17
  1512.       Rose figure, 18
  1513.       SAVE command, 16
  1514.       Scaling, 13
  1515.       SEC function, 8
  1516.       Secant, 8
  1517.       SIN function, 8
  1518.       SINH function, 8
  1519.       SQRT function, 8
  1520.       Standard error function, 7
  1521.       Startup file, 11
  1522.       STEP function, 8
  1523.       Symbolic constants., 5
  1524.       T function, 8
  1525.       TAN function, 8
  1526.       TANH function, 8
  1527.       Title color, 13
  1528.       TITLE command, 16
  1529.       Trademark notice, 21
  1530.       TSX-32, 23
  1531.       WAXES command, 16
  1532.       WFn command, 16
  1533.       WGRID command, 16
  1534.       WIDTH command, 15
  1535.       Y0 function, 8
  1536.       Y1 function, 8
  1537.       YN function, 8
  1538.